package com.example.sunsg.okhttptest.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by sunsg on 15/11/9.
 */
public class Data implements Parcelable{
    public String id;

    public String product;

    public Data(String id,String product){
        this.id = id;
        this.product = product;
    }


    @Override
    public String toString() {
        return "Data{" +
                "id='" + id + '\'' +
                ", product='" + product + '\'' +
                '}';
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.product);
    }

    protected Data(Parcel in) {
        this.id = in.readString();
        this.product = in.readString();
    }

    public static final Creator<Data> CREATOR = new Creator<Data>() {
        public Data createFromParcel(Parcel source) {
            return new Data(source);
        }

        public Data[] newArray(int size) {
            return new Data[size];
        }
    };
}
